<template>
	<view>
		<view class="boxes">
			<rich-text :nodes="msg.content"></rich-text>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			msg: {}
		};
	},
	async onLoad(options) {
		let res = await this.$api.policy({ type: 'baoxian' });
		if (res.code == 1) {
			res.data.content = res.data.content.replace(/\<img/gi, '<img style="display: inline-block;max-width: 100%;overflow: hidden;" ')
			this.msg = res.data;
		}
	},
	methods: {}
};
</script>

<style scoped lang="scss">
.boxes {
	background: #fff;
	margin: 20rpx;
	padding: 20rpx;
	border-radius: 10rpx;
	font-size: 28rpx;
	font-family: PingFang SC;
	font-weight: bold;
	color: #000000;
	line-height: 36rpx;
	box-sizing: border-box;
}
.boxes [alt]{width: 100%;}
</style>
